<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php echo TITLE . (isset($title) ? ' - ' . $title : ''); ?></title>
        <!-- Start of styles -->
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'public/css/reset_css.css'; ?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'public/css/global.css'; ?>" />
        <?php
            if(isset($flexigrid_js))
            {
                if($flexigrid_js)
                {
        ?>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'public/css/flexigrid.css'; ?>" />
        <?php
                }
            }
            // Check if the css variable is set
            if(isset($css))
            {
                // Make sure that the css variable is an array
                if(is_array($css))
                {
                    // Iterate and link the external css
                    foreach($css as $filename)
                    {
                        echo '<link rel="stylesheet" type="text/css" href="' . base_url() . 'public/css/' . $filename . '.css" />';
                    }
                }
            }
        ?>
        <!-- End of styles -->
        <!-- Start of scripts -->
        <script type="text/javascript" src="<?php echo base_url() . 'public/js/jquery-1.6.1.js'; ?>"></script>
        <script type="text/javascript" src="<?php echo base_url() . 'public/js/jquery-ui-1.8.13.custom.min.js'; ?>"></script>
        <?php
            if(isset($flexigrid_js))
            {
                if($flexigrid_js)
                {
        ?>
        <script type="text/javascript" src="<?php echo base_url() . 'public/js/flexigrid.js'; ?>"></script>
        <?php
                }
            }
            
            if(isset($js))
            {
                if(is_array($js))
                {
                    foreach($js as $filename)
                    {
                        echo '<script type="text/javascript" src="' . base_url() . 'public/js/' . $filename . '.js"></script>';
                    }
                }
            }
        ?>
        <script type="text/javascript">
            <?php
                echo 'base_url = \'' . base_url() . '\'; ';
            ?>
            $('document').ready(
                function()
                {
                    <?php
                        if(isset($js_func))
                        {
                            if(is_array($js_func))
                            {
                                foreach($js_func as $func_name)
                                {
                                    echo $func_name . '();';
                                }
                            }
                        }
                    ?>
                }
            );
        </script>
        <!-- End of scripts -->
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div id="gutter"></div>
                <div id="title">
                    <h1>
                        <?php 
                            echo 'UNIVERSITY OF SAINT LOUIS TUGUEGARAO';
                        ?>
                    </h1>
                </div>
            </div>
            <div id="main">